package com.youlu.campus.common.utils.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ExcelListener<T>  extends AnalysisEventListener {
    private List<T> dataList = new ArrayList<>();

    @Override
    public void invoke(Object o, AnalysisContext analysisContext) {
        dataList.add((T)o);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
